home *** CD-ROM | disk | FTP | other *** search
/ Power Programmierung 2 / Power-Programmierung CD 2 (Tewi)(1994).iso / gnu / gnulib / ghostscr / msdos.mak < prev    next >
Encoding:
Text File  |  1991-02-04  |  6.5 KB  |  226 lines

  1. #    Copyright (C) 1989, 1990, 1991 Aladdin Enterprises.  All rights reserved.
  2. #    Distributed by Free Software Foundation, Inc.
  3. #
  4. # This file is part of Ghostscript.
  5. #
  6. # Ghostscript is distributed in the hope that it will be useful, but
  7. # WITHOUT ANY WARRANTY.  No author or distributor accepts responsibility
  8. # to anyone for the consequences of using it or for whether it serves any
  9. # particular purpose or works at all, unless he says so in writing.  Refer
  10. # to the Ghostscript General Public License for full details.
  11. #
  12. # Everyone is granted permission to copy, modify and redistribute
  13. # Ghostscript, but only under the conditions described in the Ghostscript
  14. # General Public License.  A copy of this license is supposed to have been
  15. # given to you along with Ghostscript so you can know your rights and
  16. # responsibilities.  It should be in a file named COPYING.  Among other
  17. # things, the copyright notice and this notice must be preserved on all
  18. # copies.
  19.  
  20. # makefile for Ghostscript, MS-DOS/Turbo C platform.
  21.  
  22. # ------------------------------- Options ------------------------------- #
  23.  
  24. ####### This section is the only part of the file you should need to edit.
  25.  
  26. # ------ Generic options ------ #
  27.  
  28. # Define the default directory/ies for the runtime
  29. # initialization and font files.  Separate multiple directories with a |.
  30. # Use \\ or / to indicate directories, not a single \.
  31.  
  32. GS_LIB_DEFAULT=c:/ghost|c:/ghost/fonts
  33.  
  34. # Choose generic configuration options.
  35.  
  36. # -DDEBUG
  37. #    includes debugging features (-Z switch) in the code.
  38. #      Code runs substantially slower even if no debugging switches
  39. #      are set.
  40. # -DNOPRIVATE
  41. #    makes private (static) procedures and variables public,
  42. #      so they are visible to the debugger and profiler.
  43. #      No execution time or space penalty, just larger .OBJ and .EXE files.
  44.  
  45. GENOPT=
  46.  
  47. # ------ Platform-specific options ------ #
  48.  
  49. # Define which assembler you are using.  This can be a full path name
  50. # if you want.  Normally it will be masm or tasm.
  51.  
  52. ASM=tasm
  53.  
  54. # Define the drive and directory for the Turbo C files.
  55. # COMPDIR contains the compiler and linker (normally \tc).
  56. # INCDIR contains the include files (normally \tc\include).
  57. # INC2DIR is an optional second include file directory,
  58. #   so that INCDIR can be a RAMdisk directory containing the most heavily
  59. #   used files and INC2DIR can be \tc\include (or whatever).
  60. # LIBDIR contains the library files (normally \tc\lib).
  61. # Note that these prefixes are always followed by a \,
  62. #   so if you want to use the current directory, use an explicit '.'.
  63.  
  64. COMPDIR=c:\tc
  65. INCDIR=c:\tc\include
  66. LIBDIR=c:\tc\lib
  67.  
  68. # Choose platform-specific options.
  69.  
  70. # Define the processor (CPU) type.  Options are 86, 186, 286, 386, or 486.
  71. # (The 8086 and 8088 both correspond to processor type 86.)
  72. # 286 and up do not use protected mode.  Higher numbers produce
  73. # code that may be significantly smaller and faster, but the executable
  74. # will bail out with an error message on lower-numbered processor types.
  75.  
  76. CPU_TYPE=86
  77.  
  78. # Define the math coprocessor (FPU) type.  Options are 0, 87, 287, or 387.
  79. # If the CPU type is 486, the FPU type is irrelevant, since the 80486
  80. # CPU includes the equivalent of an 80387 on-chip.
  81. # A non-zero option means that the executable will only run if a FPU
  82. # of that type (or higher) is available: this is NOT currently checked
  83. # at runtime.
  84. #   Code is significantly faster.
  85.  
  86. FPU_TYPE=0
  87.  
  88. # ---------------------------- End of options ---------------------------- #
  89.  
  90. # Define the name of the makefile -- used in dependencies.
  91.  
  92. MAKEFILE=msdos.mak
  93.  
  94. # Define parameters for the standard Aladdin Enterprises development
  95. # configuration.  These are ignored in normal use.
  96.  
  97. !if $d(ALADDIN)
  98. GENOPT=-DNOPRIVATE -DDEBUG
  99. ASM=masm
  100. !endif
  101.  
  102. # Define the extensions for the object and executable files.
  103.  
  104. OBJ=obj
  105. XE=.exe
  106.  
  107. # Define the ANSI-to-K&R dependency.  (Turbo C accepts ANSI syntax.)
  108.  
  109. AK=
  110.  
  111. # Define the directory separator and shell quote string.
  112. # The blank line in between is necessary, because MAKE interprets
  113. # the second \ as a line continuation character.
  114.  
  115. DS=\\
  116.  
  117. Q="
  118.  
  119. # Define the memory model for Turbo C.  Don't change it!
  120.  
  121. MM=l
  122.  
  123. # Define the compilation rules and flags
  124.  
  125. !if $(CPU_TYPE) >= 386
  126. ASMFLAGS=/DFOR80386
  127. PLATOPT=-1 -DFOR80386
  128. !elif $(CPU_TYPE) >= 186
  129. ASMFLAGS=
  130. PLATOPT=-1
  131. !else
  132. ASMFLAGS=
  133. PLATOPT=
  134. !endif
  135.  
  136. !if $(CPU_TYPE) == 486 || $(FPU_TYPE) >= 287
  137. FPFLAGS=-f287
  138. FPLIB=fp87
  139. !elif $(FPU_TYPE) != 0
  140. FPFLAGS=-f87
  141. FPLIB=fp87
  142. !else
  143. FPFLAGS=
  144. FPLIB=emu
  145. !endif
  146.  
  147. CCFLAGS=$(GENOPT) $(PLATOPT) $(FPFLAGS) -m$(MM)
  148. CC=$(COMPDIR)\tcc -d -r -y -G -K -N -I$(INCDIR) -I$(INC2DIR)
  149. CCA=$(CC) -a -A $(CCFLAGS) -O -c
  150. CCNA=$(CC) -a $(CCFLAGS) -O -c
  151. CCINT=$(CC) -a $(CCFLAGS) -c
  152.  
  153. .c.obj:
  154.     $(CCA) $*
  155.  
  156. .c.asm:
  157.     $(CC) $(CCFLAGS) -O -S $*
  158.  
  159. .asm.obj:
  160.     $(ASM) $(ASMFLAGS) $*;
  161.  
  162. # --------------------------- Choice of devices --------------------------- #
  163.  
  164. # Choose the device(s) to include.  See gdevs.mak for details.
  165.  
  166. DEVICES=ega epson
  167. !include "ghost.mak"
  168. !include "gdevs.mak"
  169. DEVICE_OBJS=$(ega_) $(epson_)
  170.  
  171. # -------------------------------- Library -------------------------------- #
  172.  
  173. # We have to compile gp_dos without -1, because it includes a run-time
  174. # check to make sure we are running on the right kind of processor.
  175. gp_dos.$(OBJ): gp_dos.c $(MAKEFILE) makefile
  176.     $(CC) -a -m$(MM) $(GENOPT) -DCPU_TYPE=$(CPU_TYPE) -c $*
  177.  
  178. # ------------------------------ Interpreter ------------------------------ #
  179.  
  180. iutilasm.$(OBJ): iutilasm.asm
  181.  
  182. # -------------------------- Auxiliary programs --------------------------- #
  183.  
  184. ansi2knr$(XE):
  185.     $(CC) $(CCFLAGS) -L$(LIBDIR) ansi2knr.c
  186.  
  187. genarch$(XE): genarch.c
  188.     $(CC) $(CCFLAGS) -L$(LIBDIR) genarch.c
  189.  
  190. # ----------------------------- Main program ------------------------------ #
  191.  
  192. # A rule to do a quick and dirty compilation attempt when first installing
  193. # Ghostscript.  Many of the compilations will fail: follow this with 'make'.
  194.  
  195. begin:
  196.     erase arch.h
  197.     erase genarch.exe
  198.     - $(CCA) *.c
  199.     erase gp_dos.obj
  200.  
  201. # Get around the fact that the DOS shell has a rather small limit on
  202. # the length of a command line.  (sigh)
  203.  
  204. LIBCTL=libc$(MM).tl
  205.  
  206. $(LIBCTL): $(MAKEFILE)
  207.     gssetmm $(LIBCTL) $(LIBDIR) $(FPLIB) math$(MM) c$(MM)
  208.  
  209. # Tracing package
  210.  
  211. # trace.c must be compiled without the -a switch!
  212. trace.obj: trace.c
  213.     $(CC) $(CCFLAGS) -O -c trace
  214.  
  215. LIBDOS=$(LIB) gp_dos.$(OBJ) gdevs.tl $(DEVICE_OBJS)
  216.  
  217. # Library test program
  218.  
  219. gt.exe: gt.$(OBJ) $(LIBDOS) gsmain.$(OBJ) trace.$(OBJ) $(LIBCTL)
  220.     tlink /m /l $(LIBDIR)\c0$(MM) @gdevs.tl @gt.tl $(LIBDIR)\graphics @$(LIBCTL)
  221.  
  222. # Interpreter main program
  223.  
  224. gs.exe: gs.$(OBJ) $(INT) iutilasm.$(OBJ) gsmain.$(OBJ) trace.$(OBJ) $(LIBDOS) $(LIBCTL)
  225.     tlink /m /l $(LIBDIR)\c0$(MM) @gdevs.tl @gs.tl $(LIBDIR)\graphics @$(LIBCTL)
  226.